<div id="w0" class="foo">
    <span>
        before
    </span>
    1
    <div id="w1" class="bar">
        2
    </div>
    3
    <span class="after-prime">
        4
    </span>
    5
</div>